package com.jzo2o.customer.controller.worker;

import com.jzo2o.customer.model.domain.BankAccount;
import com.jzo2o.customer.model.dto.request.BankAccountUpsertReqDTO;
import com.jzo2o.customer.service.IBankAccountService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * TODO
 *
 * @Author mr.wei
 * @Date 2025/1/17 下午8:31
 */
@RestController("workerBankAccountController")
@RequestMapping("/worker/bank-account")
@Api(tags = "服务端 - 银行账户接口")
public class BankAccountController {
    @Autowired
    private IBankAccountService bankAccountService;
    @PostMapping
    public void addBankAccount(@RequestBody BankAccountUpsertReqDTO bankAccountUpsertReqDTO) {
        bankAccountService.addBankAccount(bankAccountUpsertReqDTO);

    }

    @GetMapping("/currentUserBankAccount")
    public BankAccount getCurrentUserBankAccount() {
      return    bankAccountService.getCurrentUserBankAccount();
    }
}
